import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    isLogin:false,
    dialogVisible:false,
    isPlay:false,
    currentId:'',
    fullscreenLoading: false
  },
  getters: {
    dialogVisible(state){return state.dialogVisible},
    isLogin(state){return state.isLogin},
    isPlay(state){return state.isPlay},
    currentId(state){return state.currentId},
    loading(state){return state.fullscreenLoading}
  },
  mutations: {
    setDialogVisible(state,val = false){
      state.dialogVisible = val
    },
    setIsLogin(state,val = false){
      state.isLogin = val
    },
    setIsPlay(state,val = false){
      state.isPlay = val
    },
    setCurrentId(state,val = ''){
      state.currentId = val
    },
    setLoading(state,val = false){
      state.fullscreenLoading = val
    }
  },
  actions: {
  },
  modules: {
  }
})
